
#ifndef GLOBAL_HPP_GCC
#define GLOBAL_HPP_GCC


#ifdef __GNUC__
	#include <sys/time.h>
	#define TIMER_DEFINITION()   struct timeval  t_start, t_stop;	float  t_elapse
	#define TIMER_START()        gettimeofday(&t_start,NULL)
	#define TIMER_END()          gettimeofday(&t_stop,NULL); 	t_elapse=1000000*(t_stop.tv_sec-t_start.tv_sec)+ t_stop.tv_usec-t_start.tv_usec; 	t_elapse/=1000000
	#define TIMER_ELAPSE(t)      t=t_elapse
#elif defined(_WIN32)
	#include <sys/types.h>
	#include <time.h>
	#define TIMER_DEFINITION()  clock_t  t_start, t_stop;	float  t_elapse
	#define TIMER_START()       t_start=clock()
	#define TIMER_END()         t_stop=clock(); t_elapse=(t_stop-t_start)/(float)CLOCKS_PER_SEC 
	#define TIMER_ELAPSE(t)     t=t_elapse
#endif

#define byte    unsigned char
#define uint8	unsigned char
#define uint16	unsigned short
#define uint32	unsigned int
#define uint64	unsigned long long
#define int8	char
#define int16	short
#define int32	int
#define int64	long long
#define DWORD	unsigned long

#define MEGA	1024  //1048576
#define KILO	1024
#define DAY		86400

#define SPACE	32
#define TABLE	9
#define NEWLINE 10
#define RETURN	13

#define ENDMARK	0xFFFFFFFF
#define DAY		86400

#define MAX		0xFFFFFFFFFF
#define FUTURE	0xFFFFFFFFFF







#endif


